package com.dream.keigezhushou.Activity.acty.listen.golden;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.dream.keigezhushou.Activity.BaseActivity;
import com.dream.keigezhushou.Activity.adapter.ThirdAdapter;
import com.dream.keigezhushou.R;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ChooseLocalMusicActivity extends BaseActivity {

    @BindView(R.id.iv_return)
    ImageView ivReturn;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.lv_local)
    ListView lvLocal;

    private ArrayList<String> mms;
    private ThirdAdapter thirdAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_choose_local_music);
        ButterKnife.bind(this);

        initView();
        initData();
    }

    //初始化界面
    protected void initView(){

        tvTitle.setText("选择本地文件");

        mms = new ArrayList<String>();
        for (int i = 0; i < 20; i++) {
            mms.add("" + (char) i);

        }
    }

    //初始化数据
    protected void initData(){

        ivReturn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                //返回
                finish();
            }
        });

        thirdAdapter = new ThirdAdapter(ChooseLocalMusicActivity.this, mms);


        lvLocal.setAdapter(thirdAdapter);
    }
}
